<template>
  <h2>Button Attributes</h2>
  <el-table :data="tableData" style="width: 100%">
    <el-table-column prop="attribute" label="属性"  />
    <el-table-column prop="explain" label="说明"  />
    <el-table-column prop="type" label="类型" />
    <el-table-column prop="default" label="默认值" />
  </el-table>
</template>

<script lang="ts" setup>
import { ref, computed } from 'vue';

const tableData = ref([]);

const columns = [
  { attribute: 'name', explain: '姓名', type: 'string', default: '无' },
  { attribute: 'age', explain: '年龄', type: 'number', default: 0 },
  // 其他列...
];

// 生成假数据
for (let i = 0; i < 10; i++) {
  tableData.value.push({ ...columns[i % columns.length] });
}

// 生成tableData
const generatedTableData = computed(() => {
  return tableData.value;
});
</script>